package com.ruoyi.web.controller;

import com.ruoyi.web.entity.HelloWorldEntity;
import com.ruoyi.web.service.HelloWorldService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：wang.j.f
 * @description：TODO
 * @date ：Created in 2021/6/8 16:05
 * @modified By：
 * @version: 1.0$
 */
@RestController
@RequestMapping("/test")
public class Test {

    @Autowired
    private HelloWorldService helloWorldService;

    @PostMapping("/insert")
    public String insert(){
        HelloWorldEntity entity = new HelloWorldEntity();
        entity.setYourName("王建峰");
        entity.setSayHello("hello");
        helloWorldService.insert(entity);
        return "成功";
    }

}
